package com.as.db.entity;

import java.util.Set;
import java.util.TreeSet;

import javax.persistence.DiscriminatorColumn;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;

/**
 * @author Juan Carlos
 * @version 1.0
 * @created 20-may-2010 11:36:26
 */
@Entity
@Table(name="departamentos")
@Inheritance(strategy=InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(name="nombre_departamento")
@DiscriminatorValue("Departamento")
public class Departamento {

	private Long id;
	private String nombre;
	private Set<Empleado> empleados = new TreeSet<Empleado>();
	private Empleado responsable;

	@Id
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}


	public String getNombre(){
		return "";
	}

	/**
	 * 
	 * @param nombre
	 */
	public void setNombre(String nombre){

	}
	
	@ManyToMany
	public Set<Empleado> getEmpleados(){
		return null;
	}

	/**
	 * 
	 * @param personas
	 */
	public void setEmpleados(Set<Empleado> personas){

	}

	@OneToOne
	@JoinColumn(name="responsable_fk_id")
	public Empleado getResponsable(){
		return null;
	}

	/**
	 * 
	 * @param responsable
	 */
	public void setResponsable(Empleado responsable){

	}
}